3.1.7 \(\int \frac {(d+e x) (a+b \log (c x^n))}{x^3} \, dx\) [7]

Optimal. Leaf size=60 \[ -\frac {b d n}{4 x^2}-\frac {b e n}{x}+\frac {b e^2 n \log (x)}{2 d}-\frac {(d+e x)^2 \left (a+b \log \left (c x^n\right )\right )}{2 d x^2} \]

[Out]

-1/4*b*d*n/x^2-b*e*n/x+1/2*b*e^2*n*ln(x)/d-1/2*(e*x+d)^2*(a+b*ln(c*x^n))/d/x^2

________________________________________________________________________________________

Rubi [A]
time = 0.03, antiderivative size = 60, normalized size of antiderivative = 1.00, number of steps used = 4, number of rules used = 4, integrand size = 19, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.210, Rules used = {37, 2372, 12, 45} \begin {gather*} -\frac {(d+e x)^2 \left (a+b \log \left (c x^n\right )\right )}{2 d x^2}+\frac {b e^2 n \log (x)}{2 d}-\frac {b d n}{4 x^2}-\frac {b e n}{x} \end {gather*}

Antiderivative was successfully verified.

[In]

Int[((d + e*x)*(a + b*Log[c*x^n]))/x^3,x]

[Out]

-1/4*(b*d*n)/x^2 - (b*e*n)/x + (b*e^2*n*Log[x])/(2*d) - ((d + e*x)^2*(a + b*Log[c*x^n]))/(2*d*x^2)

Rule 12

Int[(a_)*(u_), x_Symbol] :> Dist[a, Int[u, x], x] /; FreeQ[a, x] &&  !MatchQ[u, (b_)*(v_) /; FreeQ[b, x]]

Rule 37

Int[((a_.) + (b_.)*(x_))^(m_.)*((c_.) + (d_.)*(x_))^(n_), x_Symbol] :> Simp[(a + b*x)^(m + 1)*((c + d*x)^(n +
1)/((b*c - a*d)*(m + 1))), x] /; FreeQ[{a, b, c, d, m, n}, x] && NeQ[b*c - a*d, 0] && EqQ[m + n + 2, 0] && NeQ
[m, -1]

Rule 45

Int[((a_.) + (b_.)*(x_))^(m_.)*((c_.) + (d_.)*(x_))^(n_.), x_Symbol] :> Int[ExpandIntegrand[(a + b*x)^m*(c + d
*x)^n, x], x] /; FreeQ[{a, b, c, d, n}, x] && NeQ[b*c - a*d, 0] && IGtQ[m, 0] && ( !IntegerQ[n] || (EqQ[c, 0]
&& LeQ[7*m + 4*n + 4, 0]) || LtQ[9*m + 5*(n + 1), 0] || GtQ[m + n + 2, 0])

Rule 2372

Int[((a_.) + Log[(c_.)*(x_)^(n_.)]*(b_.))*(x_)^(m_.)*((d_) + (e_.)*(x_)^(r_.))^(q_.), x_Symbol] :> With[{u = I
ntHide[x^m*(d + e*x^r)^q, x]}, Dist[a + b*Log[c*x^n], u, x] - Dist[b*n, Int[SimplifyIntegrand[u/x, x], x], x]]
 /; FreeQ[{a, b, c, d, e, n, r}, x] && IGtQ[q, 0] && IntegerQ[m] &&  !(EqQ[q, 1] && EqQ[m, -1])

Rubi steps

\begin {align*} \int \frac {(d+e x) \left (a+b \log \left (c x^n\right )\right )}{x^3} \, dx &=-\frac {(d+e x)^2 \left (a+b \log \left (c x^n\right )\right )}{2 d x^2}-(b n) \int -\frac {(d+e x)^2}{2 d x^3} \, dx\\ &=-\frac {(d+e x)^2 \left (a+b \log \left (c x^n\right )\right )}{2 d x^2}+\frac {(b n) \int \frac {(d+e x)^2}{x^3} \, dx}{2 d}\\ &=-\frac {(d+e x)^2 \left (a+b \log \left (c x^n\right )\right )}{2 d x^2}+\frac {(b n) \int \left (\frac {d^2}{x^3}+\frac {2 d e}{x^2}+\frac {e^2}{x}\right ) \, dx}{2 d}\\ &=-\frac {b d n}{4 x^2}-\frac {b e n}{x}+\frac {b e^2 n \log (x)}{2 d}-\frac {(d+e x)^2 \left (a+b \log \left (c x^n\right )\right )}{2 d x^2}\\ \end {align*}

________________________________________________________________________________________

Mathematica [A]
time = 0.02, size = 41, normalized size = 0.68 \begin {gather*} -\frac {2 a (d+2 e x)+b n (d+4 e x)+2 b (d+2 e x) \log \left (c x^n\right )}{4 x^2} \end {gather*}

Antiderivative was successfully verified.

[In]

Integrate[((d + e*x)*(a + b*Log[c*x^n]))/x^3,x]

[Out]

-1/4*(2*a*(d + 2*e*x) + b*n*(d + 4*e*x) + 2*b*(d + 2*e*x)*Log[c*x^n])/x^2

________________________________________________________________________________________

Maple [C] Result contains higher order function than in optimal. Order 9 vs. order 3.
time = 0.06, size = 232, normalized size = 3.87

method result size
risch \(-\frac {b \left (2 e x +d \right ) \ln \left (x^{n}\right )}{2 x^{2}}-\frac {-2 i \pi b e x \,\mathrm {csgn}\left (i c \right ) \mathrm {csgn}\left (i x^{n}\right ) \mathrm {csgn}\left (i c \,x^{n}\right )+2 i \pi b e x \,\mathrm {csgn}\left (i c \right ) \mathrm {csgn}\left (i c \,x^{n}\right )^{2}+2 i \pi b e x \,\mathrm {csgn}\left (i x^{n}\right ) \mathrm {csgn}\left (i c \,x^{n}\right )^{2}-2 i \pi b e x \mathrm {csgn}\left (i c \,x^{n}\right )^{3}+4 \ln \left (c \right ) b e x +4 b e n x +4 a e x -i \pi b d \,\mathrm {csgn}\left (i c \right ) \mathrm {csgn}\left (i x^{n}\right ) \mathrm {csgn}\left (i c \,x^{n}\right )+i \pi b d \,\mathrm {csgn}\left (i c \right ) \mathrm {csgn}\left (i c \,x^{n}\right )^{2}+i \pi b d \,\mathrm {csgn}\left (i x^{n}\right ) \mathrm {csgn}\left (i c \,x^{n}\right )^{2}-i \pi b d \mathrm {csgn}\left (i c \,x^{n}\right )^{3}+2 d b \ln \left (c \right )+b d n +2 a d}{4 x^{2}}\) \(232\)

Verification of antiderivative is not currently implemented for this CAS.

[In]

int((e*x+d)*(a+b*ln(c*x^n))/x^3,x,method=_RETURNVERBOSE)

[Out]

-1/2*b*(2*e*x+d)/x^2*ln(x^n)-1/4*(-2*I*Pi*b*e*x*csgn(I*c)*csgn(I*x^n)*csgn(I*c*x^n)+2*I*Pi*b*e*x*csgn(I*c)*csg
n(I*c*x^n)^2+2*I*Pi*b*e*x*csgn(I*x^n)*csgn(I*c*x^n)^2-2*I*Pi*b*e*x*csgn(I*c*x^n)^3+4*ln(c)*b*e*x+4*b*e*n*x+4*a
*e*x-I*Pi*b*d*csgn(I*c)*csgn(I*x^n)*csgn(I*c*x^n)+I*Pi*b*d*csgn(I*c)*csgn(I*c*x^n)^2+I*Pi*b*d*csgn(I*x^n)*csgn
(I*c*x^n)^2-I*Pi*b*d*csgn(I*c*x^n)^3+2*d*b*ln(c)+b*d*n+2*a*d)/x^2

________________________________________________________________________________________

Maxima [A]
time = 0.27, size = 60, normalized size = 1.00 \begin {gather*} -\frac {b n e}{x} - \frac {b e \log \left (c x^{n}\right )}{x} - \frac {b d n}{4 \, x^{2}} - \frac {a e}{x} - \frac {b d \log \left (c x^{n}\right )}{2 \, x^{2}} - \frac {a d}{2 \, x^{2}} \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate((e*x+d)*(a+b*log(c*x^n))/x^3,x, algorithm="maxima")

[Out]

-b*n*e/x - b*e*log(c*x^n)/x - 1/4*b*d*n/x^2 - a*e/x - 1/2*b*d*log(c*x^n)/x^2 - 1/2*a*d/x^2

________________________________________________________________________________________

Fricas [A]
time = 0.39, size = 54, normalized size = 0.90 \begin {gather*} -\frac {b d n + 4 \, {\left (b n + a\right )} x e + 2 \, a d + 2 \, {\left (2 \, b x e + b d\right )} \log \left (c\right ) + 2 \, {\left (2 \, b n x e + b d n\right )} \log \left (x\right )}{4 \, x^{2}} \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate((e*x+d)*(a+b*log(c*x^n))/x^3,x, algorithm="fricas")

[Out]

-1/4*(b*d*n + 4*(b*n + a)*x*e + 2*a*d + 2*(2*b*x*e + b*d)*log(c) + 2*(2*b*n*x*e + b*d*n)*log(x))/x^2

________________________________________________________________________________________

Sympy [A]
time = 0.27, size = 58, normalized size = 0.97 \begin {gather*} - \frac {a d}{2 x^{2}} - \frac {a e}{x} - \frac {b d n}{4 x^{2}} - \frac {b d \log {\left (c x^{n} \right )}}{2 x^{2}} - \frac {b e n}{x} - \frac {b e \log {\left (c x^{n} \right )}}{x} \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate((e*x+d)*(a+b*ln(c*x**n))/x**3,x)

[Out]

-a*d/(2*x**2) - a*e/x - b*d*n/(4*x**2) - b*d*log(c*x**n)/(2*x**2) - b*e*n/x - b*e*log(c*x**n)/x

________________________________________________________________________________________

Giac [A]
time = 2.36, size = 57, normalized size = 0.95 \begin {gather*} -\frac {4 \, b n x e \log \left (x\right ) + 4 \, b n x e + 4 \, b x e \log \left (c\right ) + 2 \, b d n \log \left (x\right ) + b d n + 4 \, a x e + 2 \, b d \log \left (c\right ) + 2 \, a d}{4 \, x^{2}} \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate((e*x+d)*(a+b*log(c*x^n))/x^3,x, algorithm="giac")

[Out]

-1/4*(4*b*n*x*e*log(x) + 4*b*n*x*e + 4*b*x*e*log(c) + 2*b*d*n*log(x) + b*d*n + 4*a*x*e + 2*b*d*log(c) + 2*a*d)
/x^2

________________________________________________________________________________________

Mupad [B]
time = 3.70, size = 47, normalized size = 0.78 \begin {gather*} -\frac {a\,d+x\,\left (2\,a\,e+2\,b\,e\,n\right )+\frac {b\,d\,n}{2}}{2\,x^2}-\frac {\ln \left (c\,x^n\right )\,\left (\frac {b\,d}{2}+b\,e\,x\right )}{x^2} \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

int(((a + b*log(c*x^n))*(d + e*x))/x^3,x)

[Out]

- (a*d + x*(2*a*e + 2*b*e*n) + (b*d*n)/2)/(2*x^2) - (log(c*x^n)*((b*d)/2 + b*e*x))/x^2

________________________________________________________________________________________